﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Windows.Forms;
using Go.Model;
using Go.Tools;
using tpGo;

namespace Go
{
    public class PlayerView
    {

        private static String ERRORSTRINGJUGADAINVALIDA = "Jugada invalida";

        public static void UpdatePlayer(Player aPlayer, Tablero aTablero)
        {
            if (aPlayer.isWhite())
            {
                aTablero.PanelPlayer1.Enabled = true;
                aTablero.PanelPlayer2.Enabled = false;
            }
            else
            {
                aTablero.PanelPlayer2.Enabled = true;
                aTablero.PanelPlayer1.Enabled = false;
            }
        }

        public static void setMensajeErrorJugada(Player aPlayer, Tablero aTablero)
        {
            if (aPlayer.isWhite())
                aTablero.InfoPlayer1Move.Text = ERRORSTRINGJUGADAINVALIDA;
            else
                aTablero.InfoPlayer2Move.Text = ERRORSTRINGJUGADAINVALIDA;
        }

        public static void resetMensajeErrorJugada(Player aPlayer, Tablero aTablero)
        {
            if (aPlayer.isWhite())
                aTablero.InfoPlayer1Move.Text = "";
            else
                aTablero.InfoPlayer2Move.Text = "";
        }

    }
}
